import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class Demo86 {
    public static void main(String[] args) {
        try(OutputStream outputStream = new FileOutputStream("./text.txt",true)){
            byte[] buffer = new byte[]{'a','v','s','y'};
            outputStream.write(buffer);
            outputStream.flush();
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
